<!-- 我的查询 -->

<template>
  <SecureSearch>
    <template #btn>
      <BtnPrimary :title="MAP.tipEdit" @click="toEdit" />
    </template>

    <ParamStatusMulti bind="statusList" :dict="GETTER.STATUS" hasRight isCheckbox />

    <ParamInput label="终端名称" bind="terminalName" />
    <ParamSelect label="所属分组" bind="groupId" :dict="group_selectDict" />
  </SecureSearch>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import MySearch from '@admin/views/Secure/Access/AccessList/MySearch'

// ============================== 导出组件 ============================== //

export default CORE.extend(MySearch, {
  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixSelect('group', 'group_')],

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: {
    /**
     * 点击设置
     */
    toEdit() {
      const { param: { idList }, MAP: { WORD } } = this

      if (!idList.length) {
        CORE.MSG.warning(`请选择${WORD}`)
        return
      }

      this.openEdit({ idList })
    },
  },
})
</script>
